package com.itheima.thread;
/*
创建一个类 继承 Thread
重写 run 方法
创建对象  开启 线程  start
 */
public class Demo01 {
    public static void main(String[] args) {
        MyThread t = new MyThread();
        t.start();
        for (int i = 0; i < 100; i++) {
            System.out.println("main执行到了"+i);

        }

    }

}
class   MyThread extends Thread{
    public MyThread() {
        super();
    }

    @Override
    public void run() {

        for (int i = 0; i < 100; i++) {
            System.out.println("Mythread执行到了"+i);

        }
    }
}